<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>留言板</title>
<style>
* {
 font-size:12px;
 margin:0;
 padding:0; 
} 
fieldset {
 padding:10px;
 margin:10px;
 width:270px;
 color:#333; 
 border:#06c dashed 1px;
} 
legend {
 color:#06c;
 font-weight:800; 
 background:#fff;
	text-align:center
} 
ul {
 list-style-type: none;
 margin:8px 0 4px 0;
} 
li {
 margin-top:4px;
}
</style>

</head>

<body style="text-align:center">
<fieldset style="width:326px"> 
 <legend>消息显示区</legend> 
<?php   
include_once "config.php";  
include_once "functions.php";   

$sql = "SELECT * FROM  wish";
$result = $conn->query($sql);

$arrlist = array();

if ($result->num_rows > 0) {  
    // 输出每行数据
    while($row = $result->fetch_assoc()) {
        array_push($arrlist, $row);        
    }
} else {
    echo "0 results";
}
/*
echo "<pre>";
print_r($arrlist);


print_r(json_encode($arrlist));
die;
 * 
 */

$conn->close();          
           ?>             
<?php
foreach ($arrlist as $vo){
?>            
            <dl class='paper a1'>
			<dd class='content'><?php  echo phiz_replace($vo[ 'con']); ?></dd>
				<a href="" class='close'></a>
			</dd>
		</dl>  
<?php    }   ?>

 <ul id="ulContent" style="text-align:left"> 
</ul> 
</fieldset>

<br>

<fieldset> 
    <div>
<legend>消息发送区</legend> 

<form action="handler.php" name='wish' method="post">
<!--form name="wish" method="post" action="handler.php"-->
 <label>     

 <textarea name="conten" id="content" cols="40" rows="10"></textarea>
 </label>  
	
 <label>
 <input type="submit" name="lll" value="留言">
 <!--input type="button" name="button" id="button" value="test" -->
 </label>
</fieldset>
</div>
  </form>	  
</body>
</html>